import request from '@/utils/request'
// 获取权限列表
export function getPermissionList(params) {
  return request({
    url: `/sys/permission`,
    params
  })
}
// 获取新增接口
export function addPermissionList(data) {
  return request({
    url: `/sys/permission`,
    method: 'post',
    data
  })
}
// 获取删除接口
export function delPermissionApi(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE'
  })
}
// 获取修改
export function editPermissionApi(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}
// 获取详情
export function onePermissionApi(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'get'
  })
}
